home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 7
/
Aminet 7 - August 1995.iso
/
Aminet
/
comm
/
mebbs
/
chicago210.lha
/
chicago.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-01-21
|
45KB
|
1,262 lines
/* Chicago Gangland Version 2.10 by Steve Robbins Last updated 21 Jan 95 */
options results
parse arg LineNumber
bbsname = 'The Guru Meditation' /*Put BBS name here, 'BBS' will be appended*/
if ~show('L','rexxsupport.library') then do
if addlib('rexxsupport.library',0,-30,0) then NOP
else do
say 'Rexxsupport.library is not available'
exit 10
end
end
if( ~show( 'l', "mebbsarexx.library" ) )then do
if( ~addlib( "mebbsarexx.library", 0, -30, 0 ) )then do
say "Could not open library"
exit 10
end
end
signal on syntax
signal on ioerr
DoorName = "Chicago Gangland"
call GETVAR DoorName, LineNumber, 1
SpaceName = result
Firstname = Delword(SpaceName,2)
Name = space(SpaceName,1,'_')
CLS = 'H'
call GETVAR DoorName, LineNumber, 8
ansiflag = result
if ansiflag > 1 then ansiflag = 1
call GETVAR DoorName, LineNumber, 10
LINES = upper(result)
random(1,2,time('s'))
if ansiflag then do
WHITE = '
'
RED = '
'
YELLOW ='
'
BLACK = '
'
GREEN = '
'
CYAN = '
'
MAGENTA = '
'
BLUE = '
'
CLEAR = ''
HOM = 'H'
end
else do
WHITE = ''
RED = ''
YELLOW =''
BLACK = ''
GREEN = ''
CYAN = ''
MAGENTA = ''
BLUE = ''
CLEAR = ''
HOM = ''
end
File.1 = 'Doors:chicago/Gangland/instructions'
File.2 = 'Doors:chicago/gangland/news7'
File.3 = 'Doors:chicago/gangland/news6'
File.4 = 'Doors:chicago/gangland/news5'
File.5 = 'Doors:chicago/gangland/news4'
File.6 = 'Doors:chicago/gangland/news3'
File.7 = 'Doors:chicago/gangland/news2'
File.8 = 'Doors:chicago/gangland/news1'
File.9 = 'Doors:chicago/gangland/Chicago.data'
File.10 = 'Doors:chicago/Gangland/instructionsans'
/* starting Stats */
datec = date()
costfor = 1
pos = 0
deathflag = 0
q=0
/*begin*/
if exists("doors:Chicago/Gangland/InUse") then do
call open(inuse,"doors:Chicago/Gangland/InUse",'R')
test = readln(inuse)
if word(test,1) ~= LineNumber then do
call message DoorName, LineNumber, "This game is currently in use on another line.", 1
call message DoorName, LineNumber, "Please try back again in a few minutes.", 1
address command "wait 1"
call Exit_Door DoorName, LineNumber
exit
end
call close(inuse)
end
call open(inuse, "Doors:Chicago/Gangland/InUse", 'W')
call writeln(inuse, LineNumber || " " || SpaceName)
call close(inuse)
call message DoorName, LineNumber, CLS, 1
call open(data,File.9,'R')
call message DoorName, LineNumber, 'Loading Chicago Gangland...', 0
do c = 1 to 25
call message DoorName, LineNumber, '.', 0
do c1 = 1 to 25
protect.c.c1 = readln(data)
end
end
z=0
do until EOF(data)
z=z+1
stats.z=readln(data)
parse var stats.z name.z alias.z turnsleft.z gangmembers.z startx.z starty.z points.z money.z totalgangmembers.z protection.z bootleg.z
protection.z = STRIP(protection.z)
bootleg.z = STRIP(bootleg.z)
if name = name.z then q=z
alias.z = translate(alias.z,' ','_','')
end
call message DoorName, LineNumber, ' ', 1
call message DoorName, LineNumber, ' ', 1
call message DoorName, LineNumber, BLUE'Done'CLEAR, 1
call close(data)
street.1 = First
street.2 = Second
street.3 = Third
street.4 = Fourth
street.5 = Fifth
street.6 = Sixth
street.7 = Seventh
street.8 = Eighth
street.9 = Ninth
street.10 = Tenth
street.11 = Eleventh
street.12 = Twelveth
street.13 = Thirteenth
street.14 = Fourteenth
street.15 = Fifteenth
street.16 = Sixteenth
street.17 = Seventeenth
street.18 = Eighteenth
street.19 = Nineteenth
street.20 = Twentieth
street.21 = Twentyfirst
street.22 = Twentysecond
street.23 = Twentythird
street.24 = Twentyfourth
street.25 = Twentyfifth
call message DoorName, LineNumber, CLS, 1
if ansiflag then do
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, '
***********************************************', 1
call message DoorName, LineNumber, ' * *', 1
call message DoorName, LineNumber, ' *
Chicago Gangland
*', 1
call message DoorName, LineNumber, ' *
Version 2.10
*', 1
call message DoorName, LineNumber, ' *
Written for Skyline BBS
*', 1
call message DoorName, LineNumber, ' *
Converted to MEBBSNet
*', 1
call message DoorName, LineNumber, ' *
by Steve Robbins [MT2012]
*', 1
call message DoorName, LineNumber, ' * *', 1
call message DoorName, LineNumber, ' ***********************************************', 1
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, '', 1
call hotkey DoorName, LineNumber, 'Hit return to continue...'
call checkcarrier
end
else do
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, ' ***********************************************', 1
call message DoorName, LineNumber, ' * *', 1
call message DoorName, LineNumber, ' * Chicago Gangland *', 1
call message DoorName, LineNumber, ' * Version 2.10 *', 1
call message DoorName, LineNumber, ' * Written for Skyline BBS *', 1
call message DoorName, LineNumber, ' * Converted to MEBBSNet *', 1
call message DoorName, LineNumber, ' * by Steve Robbins [MT2012] *', 1
call message DoorName, LineNumber, ' * *', 1
call message DoorName, LineNumber, ' ***********************************************', 1
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, '', 1
call hotkey DoorName, LineNumber, 'Hit return to continue...'
call checkcarrier
end
aliascheck:
if alias.q = 'DEADMAN' then do
call message DoorName, LineNumber, CLS, 1
call message DoorName, LineNumber, RED||"You have already died today. Come back tomorrow to get restarted.", 1
address command "wait 1"
call close(aliases)
signal goodbye
end
if q = 0 then do
call message DoorName, LineNumber, '', 1
call checkcarrier
call prompt DoorName, LineNumber, ''Magenta'Please enter an alias:', 15
alias = upper(result)
if alias = '' then do
call message DoorName, LineNumber, RED'You must enter an alias!'CLEAR, 1
signal aliascheck
end
do i = 1 to z
if alias = alias.i then do
call message DoorName, LineNumber, RED'That alias is already being used!', 1
address command "wait 1"
signal aliascheck
end
end
end
signal begin
begin:
if q = 0 then do
z = z + 1
q = z
name.z = name
alias.z = alias
turnsleft.z = 20
gangmembers.z = 50
startx.z = upper(random(1,25,time('s')))
starty.z = upper(random(1,25,time('s')))
points.z = 5000
money.z = 1000
totalgangmembers.z = 50
protection.z = 0
bootleg.z = 0
call open(news7,file.2,'A')
call writeln(news7,'Ganglord 'alias' has moved into the Chicago!')
call close(news7)
signal messages
end
else do
call open(news7,file.2,'A')
call writeln(news7,'Ganglord 'alias.q' is active again!')
call close(news7)
signal messages
end
messages:
call message DoorName, LineNumber, CLS, 1
call message DoorName, LineNumber, MAGENTA'Searching for messages...', 1
if ~exists('Doors:chicago/gangland/messages') then do
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, RED'No messages found!', 1
address command "wait 1"
signal main
end
call open(mess,'Doors:chicago/gangland/messages','R')
i = 0
do until EOF(mess)
i = i + 1
j = 1
tomess.i = readln(mess)
frommess.i = readln(mess)
do until mymess.i.j = '*****' | EOF(mess)
j = j + 1
mymess.i.j = readln(mess)
end
if tomess.i = alias.q then do
k = 1
call message DoorName, LineNumber, CLS, 1
call message DoorName, LineNumber, GREEN' TO: 'MAGENTA tomess.i, 1
tomess.i = ''
call message DoorName, LineNumber, GREEN'FROM: 'MAGENTA frommess.i, 1
frommess.i = ''
j = 1
do until mymess.i.j = '*****' | EOF(mess)
j = j + 1
if mymess.i.j ~= '*****' then call message DoorName, LineNumber, CYAN mymess.i.j, 1
end
call hotkey DoorName, LineNumber, 'Hit return to continue...'
call checkcarrier
end
end
h = i
call close(mess)
if k = 1 then do
call open(mess,'Doors:chicago/gangland/messages','W')
i = 0
do until i = h
i = i + 1
r = 0
if tomess.i ~= '' then do
call writeln(mess,tomess.i)
r = 1
s = 1
end
if frommess.i ~= '' then writeln(mess,frommess.i)
j = 1
if s = 1 then do until mymess.i.j = '*****'
j = j + 1
if r = 1 then writeln(mess,mymess.i.j)
end
s = 0
end
end
call close(mess)
main:
if startx.q = 1 & starty.q = 1 then signal pool
call message DoorName, LineNumber, CLS, 1
call message DoorName, LineNumber, center(''GREEN''alias.q'',70) , 1
call message DoorName, LineNumber, ' ', 1
m = startx.q
n = starty.q
call message DoorName, LineNumber, ''CYAN'You are at the corner of 'street.m' North and 'street.n' East', 1
call message DoorName, LineNumber, 'You have 'gangmembers.q' gangmembers with you', 1
protect_alias = Delword(protect.m.n,1,1)
protect_gang = Word(protect.m.n,1)
if protect_alias ~= '' then do
proflag = 0
call message DoorName, LineNumber, 'This block is protected by' GREEN||protect_alias||CLEAR, 1
end
else do
call message DoorName, LineNumber, 'This block is not under protection'||CLEAR, 1
proflag = 1
end
do i = 1 to z
if startx.q = startx.i & starty.q = starty.i & alias.q ~= alias.i & alias.i ~= '' then do
call message DoorName, LineNumber, 'You also see 'alias.i' on this block there are 'gangmembers.i' gangmembers with him!', 1
end
end
call message DoorName, LineNumber, ' ', 1
call message DoorName, LineNumber, ''MAGENTA'Q S O C H M G N I Y E ? ('YELLOW||turnsleft.q||MAGENTA')>'CLEAR'', 0
call hotkey DoorName, LineNumber, ""
ANS = upper(result)
call checkcarrier
if ans = 'Q' then signal goodbye
if ans = 'S' then signal shootout
if ans = 'O' then signal protection
if ans = 'C' then signal addon
if ans = 'H' then signal hitother
if ans = 'M' then signal move
if ans = 'G' then signal highscores
if ans = 'N' then signal news
if ans = 'I' then signal instructions
if ans = 'Y' then signal stats
if ans = 'E' then signal enter
if ans = '' then signal main
if ans = '?' then do
call message DoorName, LineNumber, ' ', 1
call message DoorName, LineNumber, ' 'YELLOW'Q = Quit to' bbsname 'BBS', 1
call message DoorName, LineNumber, ' S = Shootout', 1
call message DoorName, LineNumber, ' O = Offer protection to the storeowners', 1
call message DoorName, LineNumber, ' C = Change your protection on this block', 1
call message DoorName, LineNumber, ' H = Hit the the protected block of another gang', 1
call message DoorName, LineNumber, ' M = Move to another block', 1
call message DoorName, LineNumber, ' G = Ganglord scores', 1
call message DoorName, LineNumber, ' N = Chicago Daily News', 1
call message DoorName, LineNumber, ' I = Instructions', 1
call message DoorName, LineNumber, ' Y = Your statistics', 1
call message DoorName, LineNumber, ' E = Enter a message'CLEAR, 1
call message DoorName, LineNumber, ' ', 1
call hotkey DoorName, LineNumber, 'Hit return to continue...'
call checkcarrier
end
signal main
pool:
call message DoorName, LineNumber, CLS, 1
call message DoorName, LineNumber, GREEN'Welcome to the Southside Pool Hall', 1
call message DoorName, LineNumber, 'What is your pleasure?'CLEAR, 1
call message DoorName, LineNumber, ' ', 1
call message DoorName, LineNumber, YELLOW'M H B G Q ? ('turnsleft.q')>'CLEAR, 0
call hotkey DoorName, LineNumber, ""
ANS = upper(result)
call checkcarrier
if ans = 'M' then signal move
if ans = 'H' then signal hire
if ans = 'B' then signal still
if ans = 'G' then signal gamble
if ans = 'Q' then do
startx.q = upper(random(1,25,time('s')))
starty.q = upper(random(1,25,time('s')))
signal goodbye
end
if ans = '' then signal pool
if ans = '?' then do
call message DoorName, LineNumber, ' ', 1
call message DoorName, LineNumber, ' 'YELLOW'M = Move', 1
call message DoorName, LineNumber, ' H = Hire new gangmembers', 1
call message DoorName, LineNumber, ' B = Buy a bootleg operation', 1
call message DoorName, LineNumber, ' G = Gamble at a game of pool', 1
call message DoorName, LineNumber, ' Q = Quit to 'bbsname 'BBS'CLEAR'', 1
call message DoorName, LineNumber, ' ', 1
call hotkey DoorName, LineNumber, 'Hit return to continue...'
call checkcarrier
end
signal main
hire:
call message DoorName, LineNumber, CLS, 1
cost = random(100,200,time('s'))
if costfor > cost then cost = costfor
costfor = cost
call message DoorName, LineNumber, CYAN'New gangmembers salaries are 'cost' dollars each.', 1
call message DoorName, LineNumber, 'You currently have 'gangmembers.q 'gangmembers and 'money.q' dollars.', 1
call message DoorName, LineNumber, ' ', 1
possible = money.q % cost
call prompt DoorName, LineNumber, MAGENTA'How many gangmembers would you like to hire?('possible' max)', 7
newgang = upper(result)
call checkcarrier
if newgang = 0 | newgang = '' then signal pool
do i = 1 to length(newgang)
if ~datatype(substr(newgang,i,1),Whole) then do
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, RED'You must enter a valid whole number!', 1
address command "wait 1"
signal pool
end
end
totcost = cost * newgang
if totcost > money.q then do
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, RED'You don''t have enough money for 'newgang' gangmembers!', 1
address command "wait 1"
signal pool
end
call message DoorName, LineNumber, MAGENTA'The total of the salaries will be 'totcost' dollars.', 1
call message DoorName, LineNumber, ' ', 1
call prompt DoorName, LineNumber, CYAN'Are you sure you want to hire them?(Y/n)'CLEAR, 1
ans = upper(result)
call checkcarrier
if ans = "N" then signal pool
money.q = money.q - totcost
gangmembers.q = gangmembers.q + newgang
totalgangmembers.q = totalgangmembers.q + newgang
signal pool
still:
if money.q < 5000 then do
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, RED'You do not have enough money!'CLEAR, 1
address command "wait 1"
signal pool
end
call message DoorName, LineNumber, ' ', 1
call message DoorName, LineNumber, ' ', 1
call message DoorName, LineNumber, MAGENTA'Bootleg operations cost $5000 each. You have 'money.q' dollars.', 1
call prompt DoorName, LineNumber, 'How many bootleg operations would you like to purchase? ', 7
ans = upper(result)
call checkcarrier
if ans = '' then signal pool
if ~datatype(ans,Whole) then do
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, RED'You must enter a valid whole number!', 1
address command "wait 1"
signal pool
end
cost = 5000 * ans
if money.q < cost then do
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, RED'You do not have that much money!', 1
signal still
end
call message DoorName, LineNumber, 'It will cost you 'cost' dollars. Are you sure? (Y/n) ', 0
call hotkey DoorName, LineNumber, ""
if upper(result) = 'N' then signal pool
call checkcarrier
money.q = money.q - cost
bootleg.q = bootleg.q + ans
call message DoorName, LineNumber, ' ', 1
call message DoorName, LineNumber, CYAN'Nice doing business with you.'CLEAR, 1
address command "wait 1"
signal pool
gamble:
call message DoorName, LineNumber, CLS, 1
if turnsleft.q < 1 then do
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, RED'You do not have any turns left!', 1
delay (100)
signal pool
end
call prompt DoorName, LineNumber, CYAN'You have $'money.q', how much would you like to bet?($500 limit)'CLEAR, 9
bet = upper(result)
call checkcarrier
if bet = '0' then signal pool
if bet = '' then signal pool
do i = 1 to length(bet)
if ~datatype(substr(bet,i,1),Whole) then do
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, RED'You must enter a valid whole number!', 1
address command "wait 1"
signal pool
end
end
if bet > 500 then do
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, RED'You can not bet more than $500!'CLEAR, 1
address command "wait 1"
signal gamble
end
call message DoorName, LineNumber, ' ', 1
if bet > money.q then do
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, RED'You don''t have that much money'CLEAR, 1
address command "wait 1"
signal pool
end
win = random(1,3,time('s'))
if bet = '' then signal pool
turnsleft.q = turnsleft.q - 1
call message DoorName, LineNumber, YELLOW'Rack''em up', 1
address command "wait 1"
call message DoorName, LineNumber, ' ', 1
if win = 2 then do
how = random(1,6,time('s'))
select
when how = 1 then call message DoorName, LineNumber, MAGENTA'You sank the 8 ball off the break!', 1
when how = 2 then call message DoorName, LineNumber, MAGENTA'You left him with all 7 balls on the table', 1
when how = 3 then call message DoorName, LineNumber, MAGENTA'You squeak out a victory by sinking the 8 ball', 1
when how = 4 then call message DoorName, LineNumber, MAGENTA'He scratches on the 8 ball.', 1
when how = 5 then call message DoorName, LineNumber, MAGENTA'You leave him with 3 balls on the table. Good work.', 1
otherwise call message DoorName, LineNumber, MAGENTA'You run the table on him!', 1
end
money.q = money.q + bet
call message DoorName, LineNumber, ' ', 1
call message DoorName, LineNumber, GREEN'You win!', 1
address command "wait 1"
end
if win = 1 | win = 3 then do
how = random(1,6,time('s'))
select
when how = 1 then call message DoorName, LineNumber, GREEN'He sinks the 8 ball off the break!', 1
when how = 2 then call message DoorName, LineNumber, GREEN'He left you with all 7 balls on the table', 1
when how = 3 then call message DoorName, LineNumber, GREEN'He squeaks out a victory by sinking the 8 ball', 1
when how = 4 then call message DoorName, LineNumber, GREEN'You scratch on the 8 ball. Tough Luck!', 1
when how = 5 then call message DoorName, LineNumber, GREEN'He leaves you with 3 balls on the table.', 1
otherwise call message DoorName, LineNumber, GREEN'He runs the table on you!', 1
end
money.q = money.q - bet
call message DoorName, LineNumber, ' ', 1
call message DoorName, LineNumber, RED'You lose!', 1
end
address command "wait 1"
signal pool
shootout:
killflag = 0
shoottotal = 0
call message DoorName, LineNumber, CLS, 1
do i = 1 to z
if startx.q = startx.i & starty.i = starty.q & alias.q ~= alias.i then do
shoottotal = shoottotal + 1
end
end
if shoottotal = 0 then do
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, RED'There is no one to attack!', 1
address command "wait 1"
signal main
end
call message DoorName, LineNumber, MAGENTA'Ganglords at your block:', 1
call message DoorName, LineNumber, ' ', 1
c=1
do i = 1 to z
if startx.i = startx.q & starty.i = starty.q & alias.q ~= alias.i then do
call message DoorName, LineNumber, GREEN||c'.' BLUE alias.i 'with' gangmembers.i 'gangmembers', 1
gang.c = alias.i
c=c+1
end
end
call message DoorName, LineNumber, ' ', 1
call prompt DoorName, LineNumber, MAGENTA'Enter the number of the gang you wish to attack (Return to Quit) ', 4
w = 0
victim = upper(result)
call checkcarrier
if victim = "" then signal main
do i = 1 to z
do h = 1 to c
if gang.h = alias.i then do
w = 1
r = i
junkname = alias.i
fight2 = gangmembers.i
break
end
if w = 1 then break
end
if w = 1 then break
end
if w = 0 then do
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, RED'There is no one at this block by that name!', 1
address command "wait 1"
signal main
end
fight3 = fight2
yourper1 = (gangmembers.q / (gangmembers.q + fight2)) * 100
if yourper1 > 95 then yourper1 = 95
if yourper1 < 5 then yourper1 = 5
if w = 0 then signal shootout
call open(news7,file.2,'A')
call writeln(news7,'Ganglord 'alias.q' tries to have a shootout with 'gang.victim'.')
call close(news7)
fight1 = gangmembers.q
call message DoorName, LineNumber, CLS, 1
call message DoorName, LineNumber, center(MAGENTA'Your gang: His gang:',76), 1
call message DoorName, LineNumber, center(BLUE'---------- ---------',76), 1
shootagain:
call message DoorName, LineNumber, CYAN 'H'right(gangmembers.q,20,' '), 0
call message DoorName, LineNumber, ' 'fight2' ', 1
call message DoorName, LineNumber, ' ', 1
if killflag = 0 then do
call message DoorName, LineNumber, YELLOW'RETURN to Continue K to Kill Q to Quit ', 1
call hotkey DoorName, LineNumber, ""
ans = upper(result)
call checkcarrier
call message DoorName, LineNumber, 'H ', 1
if ans = 'Q' then signal quitter2
if ans = 'K' then killflag = 1
end
losers1 = Random(1,100)
if fight2 > 1000 & gangmembers.q > 1000 then lost = 100
else if Fight2 > 50 & gangmembers.q > 50 then lost = 10
else lost = 1
if yourper1 >= losers1 then fight2 = fight2 - lost
else gangmembers.q = gangmembers.q - lost
if gangmembers.q < 0 then do
gangmembers.q = -1
signal shootyou
end
if fight2 < 0 then do
fight2 = -1
signal shoothim
end
signal Shootagain
shootyou:
call message DoorName, LineNumber, CYAN 'H'right(gangmembers.q,20,' '), 0
call message DoorName, LineNumber, ' 'fight2' ', 1
call message DoorName, LineNumber, ' ', 1
gangmembers.r = fight2
totalgangmembers.r = totalgangmembers.r - (fight3 - fight2)
pointsg = totalgangmembers.r * 100
pointsp = protection.r * 1000
points.r = pointsg + pointsp
money.r = money.r + money.q
bootleg.r = bootleg.r + bootleg.q
call open(news7,file.2,'A')
call writeln(news7,'Ganglord 'alias.q' is killed by 'alias.r'''s gang!')
call close(news7)
signal death
shoothim:
call message DoorName, LineNumber, CYAN 'H'right(gangmembers.q,20,' '), 0
call message DoorName, LineNumber, ' 'fight2' ', 1
call message DoorName, LineNumber, ' ', 1
call message DoorName, LineNumber, center(YELLOW'You wipe him out!',76), 1
address command "wait 1"
totalgangmembers.q = totalgangmembers.q - (Fight1 - gangmembers.q)
call open(aliases,'Doors:chicago/gangland/aliases','R')
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, GREEN'You find $'STRIP(money.r)' stashed in his safe.', 1
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, 'You find a ledger giving you the location to 'STRIP(bootleg.r)' bootleg operations.'CLEAR, 1
money.q = money.q + money.r
bootleg.q = bootleg.q + bootleg.r
do c = 1 to 25
do c1 = 1 to 25
if Delword(protect.c.c1,1,1) = alias.r then
protect.c.c1 = 0
end
end
w = 0
do i = 1 to z
if junkname = alias.i then do
w = 1
alias.i = ''
points.i = ''
end
if w = 1 then break
end
call message DoorName, LineNumber, ' ', 1
call open(news7,file.2,'A')
call writeln(news7,'Ganglord 'alias.q' slaughters 'junkname'.')
call close(news7)
signal main
quitter2:
gangmembers.r = fight2
totalgangmembers.r = totalgangmembers.r - (fight3 - fight2)
pointsg = totalgangmembers.r * 100
pointsp = protection.r * 1000
points.r = pointsg + pointsp
call open(news7,file.2,'A')
call writeln(news7,'Ganglord 'alias.q' runs from the shootout.')
call close(news7)
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, center(YELLOW'Chicken!',76), 1
address command "wait 1"
signal main
protection:
if turnsleft.q < 1 then do
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, RED'You do not have any turns left!', 1
delay (100)
signal main
end
if gangmembers.q < 1 then do
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, ''RED'You don''t have enough gangmembers with you to offer protection!'CLEAR'', 1
address command "wait 1"
signal main
end
protectors = word(protect.m.n,1)
if protectors = 0 then signal noprotect
protect_alias = Delword(protect.m.n,1,1)
if protect_alias ~= '' then do
call message DoorName, LineNumber, ' ', 1
call message DoorName, LineNumber, ' ', 1
call message DoorName, LineNumber, ''RED'The block already has protection from 'protect_alias'!'CLEAR'', 1
address command "wait 1"
signal main
end
noprotect:
call message DoorName, LineNumber, ' ', 1
call prompt DoorName, LineNumber, ''GREEN'How many gangmembers do you want to leave here? 'CLEAR'', 7
protectors = upper(result)
call checkcarrier
if protectors = '' then signal main
if ~datatype(protectors,Whole) then do
call message DoorName, LineNumber, RED'You must enter a valid whole number!', 1
address command "wait 1"
signal main
end
if protectors = 0 then signal main
protectors = abs(protectors)
if gangmembers.q - protectors < 0 then do
call message DoorName, LineNumber, ''RED'You don''t have that many gangmembers!', 1
signal noprotect
end
gangmembers.q = gangmembers.q - protectors
protection.q = protection.q + 1
protect.m.n = protectors' 'alias.q
turnsleft.q = turnsleft.q - 1
signal main
addon:
call message DoorName, LineNumber, CLS, 1
if protect_alias ~= alias.q then do
call message DoorName, LineNumber, RED'You have to move to a block you are protecting to add or subtract gangmembers'CLEAR, 1
address command "wait 1"
signal main
end
call message DoorName, LineNumber, GREEN'You currently have 'protect_gang' gangmembers protecting this block.', 1
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, GREEN'Do you want to add or subtract gangmembers?', 1
call message DoorName, LineNumber, BLUE' ('MAGENTA'1'BLUE')'CYAN' Add', 1
call message DoorName, LineNumber, BLUE' ('MAGENTA'2'BLUE')'CYAN' Subtract', 1
call prompt DoorName, LineNumber, YELLOW' (1,2)>', 1
addsub = upper(result)
call checkcarrier
call message DoorName, LineNumber, CLS, 1
if addsub = 1 then signal addon1
if addsub = 2 then signal addon2
else signal addon
addon1:
call prompt DoorName, LineNumber, GREEN'How many gangmembers do you want to add?', 7
addto = abs(upper(result))
call checkcarrier
if addto = '' then signal main
if gangmembers.q - addto < 0 then do
call message DoorName, LineNumber, RED'You don''t have that many gangmembers!', 1
address command "wait 1"
signal main
end
protect_add = addto + protect_gang
protect.m.n = protect_add ' ' alias.q
gangmembers.q = gangmembers.q - addto
signal main
addon2:
call prompt DoorName, LineNumber, GREEN'How many gangmembers do you want to subtract?', 7
addto = abs(upper(result))
call checkcarrier
if addto = '' then signal main
if protect_gang - addto < 0 then do
call message DoorName, LineNumber, RED'You don''t have that many gangmembers protecting this block!', 1
address command "wait 1"
signal main
end
protect_add = protect_gang - addto
if protect_add > 0 then protect.m.n = protect_add ' ' alias.q
else do
protect.m.n = 0
protection.q = protection.q - 1
end
gangmembers.q = gangmembers.q + addto
signal main
hitother:
killflag = 0
call message DoorName, LineNumber, CLS, 1
if proflag = 1 then do
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, RED'There is no one protecting this block!'CLEAR, 1
address command "wait 1"
signal main
end
if alias.q = protect_alias then do
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, RED'You cannot attack yourself!', 1
address command "wait 1"
signal main
end
do f = 1 to z
if alias.f = protect_alias then break
end
lostgang = protect_gang
yourper = (gangmembers.q / (gangmembers.q + lostgang)) * 100
if yourper > 95 then yourper = 95
call open(news7,file.2,'A')
call writeln(news7,'Ganglord 'alias.q' tries to hit 'protect_alias'''s block.')
call close(news7)
call message DoorName, LineNumber, CLS, 1
call message DoorName, LineNumber, center(MAGENTA'Your gang: His gang:',76), 1
call message DoorName, LineNumber, center(BLUE'---------- ---------',76), 1
hitagain:
hisgang = protect_gang
call message DoorName, LineNumber, CYAN 'H'right(gangmembers.q,20,' '), 0
call message DoorName, LineNumber, ' 'protect_gang' ', 1
call message DoorName, LineNumber, ' ', 1
if killflag = 0 then do
call message DoorName, LineNumber, YELLOW'RETURN to Continue K to Kill Q to Quit ', 1
call hotkey DoorName, LineNumber, ""
ans = upper(result)
call checkcarrier
call message DoorName, LineNumber, 'H ', 1
if ans = 'Q' then signal quitter
if ans = 'K' then killflag = 1
end
losers = Random(1,100)
if protect_gang > 1000 & gangmembers.q > 1000 then lost = 100
else if protect_gang > 50 & gangmembers.q > 50 then lost = 10
else lost = 1
if yourper >= losers then protect_gang = protect_gang - lost
else gangmembers.q = gangmembers.q - lost
if gangmembers.q < 0 then do
gangmembers.q = -1
signal hityou
end
if protect_gang < 1 then do
protect_gang = 0
signal hitthem
end
signal hitagain
Hityou:
call message DoorName, LineNumber, CYAN 'H'right(gangmembers.q,20,' '), 0
call message DoorName, LineNumber, ' 'protect_gang' ', 1
call message DoorName, LineNumber, ' ', 1
protect.m.n = protect_gang' 'protect_alias
address command "wait 1"
call open(news7,file.2,'A')
call writeln(news7,'Ganglord 'alias.q' is killed by 'protect_gang'''s gang!')
call close(news7)
signal death
hitthem:
call message DoorName, LineNumber, CYAN 'H'right(gangmembers.q,20,' '), 0
call message DoorName, LineNumber, ' 'protect_gang' ', 1
call message DoorName, LineNumber, ' ', 1
protect.m.n = 0
call message DoorName, LineNumber, ' ', 1
call message DoorName, LineNumber, center(YELLOW'You wipe him out!',76), 1
address command "wait 1"
call open(news7,file.2,'A')
call writeln(news7,'Ganglord 'alias.q' slaughters 'protect_alias'''s gang!')
call close(news7)
totalgangmembers.f = totalgangmembers.f - hisgang
points.f = points.f - ((hisgang * 100) - 1000)
protection.f = protection.f - 1
protect.m.n = "0"
signal main
quitter:
protect.startx.q.starty.q = protect_gang' 'protect_alias
call open(news7,file.2,'A')
call writeln(news7,'Ganglord 'alias.q' runs from the fight.')
call close(news7)
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, center(YELLOW'Chicken!',76), 1
address command "wait 1"
signal main
move:
if turnsleft.q < 1 then do
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, RED'You do not have any turns left!', 1
delay (100)
signal main
end
call message DoorName, LineNumber, ' ', 1
call message DoorName, LineNumber, ' ', 1
call message DoorName, LineNumber, ''BLUE'What location do you want to move to?', 1
call prompt DoorName, LineNumber, ' North:', 3
startxtemp1 = upper(result)
call checkcarrier
startxtemp = strip(startxtemp1,'L','0')
do i = 1 to 25
if startxtemp = i then leave
if i = 25 then do
call message DoorName, LineNumber, ' ', 1
call message DoorName, LineNumber, ''RED'Street numbers can only be whole numbers between 1 and 25'CLEAR'', 1
address command "wait 1"
signal main
end
end
call prompt DoorName, LineNumber, ' East:', 3
startytemp1 = upper(result)
call checkcarrier
startytemp = strip(startytemp1,'L','0')
do i = 1 to 25
if startytemp = i then leave
if i = 25 then do
call message DoorName, LineNumber, ' ', 1
call message DoorName, LineNumber, ''RED'Street numbers can only be whole numbers between 1 and 25'CLEAR'', 1
address command "wait 1"
signal main
end
end
startx.q = startxtemp
starty.q = startytemp
turnsleft.q = turnsleft.q - 1
signal main
highscores:
pointsg = totalgangmembers.q * 100
pointsp = protection.q * 1000
points.q = pointsg + pointsp
do o = 1 to z
highpoints.o = points.o
highalias.o = alias.o
end
do o = 1 to z
do h = o + 1 to z
if highpoints.o < highpoints.h then do
temp = highpoints.o
highpoints.o = highpoints.h
highpoints.h = temp
tempor = highalias.o
highalias.o = highalias.h
highalias.h = tempor
end
end
end
call message DoorName, LineNumber, CLS, 1
call message DoorName, LineNumber, center(YELLOW'-----------------------------------------',70), 1
call message DoorName, LineNumber, center(RED'Top 10 Chicago Ganglords',70), 1
call message DoorName, LineNumber, center(YELLOW'-----------------------------------------',70), 1
call message DoorName, LineNumber, '', 1
if z > 10 then x = 10
else x = z
do t = 1 to x
if highalias.t ~= 'DEADMAN' then do
call message DoorName, LineNumber, CYAN right(highalias.t,32,' '), 0
call message DoorName, LineNumber, MAGENTA ' ' highpoints.t, 1
end
end
do i = 1 to Lines - 16
call message DoorName, LineNumber, '', 1
end
call hotkey DoorName, LineNumber, 'Hit return to continue...'
call checkcarrier
signal main
news:
call message DoorName, LineNumber, CLS, 1
y = 0
do i = 2 to 8
select
when i = 2 then call message DoorName, LineNumber, CYAN, 1
when i = 3 then call message DoorName, LineNumber, RED, 1
when i = 4 then call message DoorName, LineNumber, MAGENTA, 1
when i = 5 then call message DoorName, LineNumber, BLUE, 1
when i = 6 then call message DoorName, LineNumber, GREEN, 1
when i = 7 then call message DoorName, LineNumber, YELLOW, 1
otherwise call message DoorName, LineNumber, WHITE, 1
end
if exists(file.i) then call open(gamenews,file.i,'R')
if exists(file.i) then do until EOF(gamenews)
y = y + 1
call message DoorName, LineNumber, Readln(gamenews), 1
if y // (LINES - 3) = 0 then do
call message DoorName, LineNumber, 'Hit RETURN to continue or Q to quit', 1
call hotkey DoorName, LineNumber, ""
ans = upper(result)
call checkcarrier
if ans = 'Q' then do
call close(gamenews)
signal main
end
end
end
call close(gamenews)
end
call hotkey DoorName, LineNumber, 'Hit return to continue...'
call checkcarrier
signal main
instructions:
call message DoorName, LineNumber, CLS, 1
if ansiflag then instfile = file.10
else instfile = file.1
i = 1
call open(instr,instfile,'R')
do until EOF(instr)
call message DoorName, LineNumber, Readln(instr), 1
if i // LINES = 0
then do
call hotkey DoorName, LineNumber, 'Hit return to continue...'
call checkcarrier
call message DoorName, LineNumber, "", 1
end
i = i + 1
end
call close(instr)
call hotkey DoorName, LineNumber, 'Hit return to continue...'
call checkcarrier
signal main
stats:
call message DoorName, LineNumber, CLS, 1
call message DoorName, LineNumber, center(RED'-----------------------------------------',76), 1
call message DoorName, LineNumber, center(YELLOW||Spacename'''s' 'STATISTICS',76), 1
call message DoorName, LineNumber, center(RED'-----------------------------------------',76), 1
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, CYAN right('Alias:',32,' '), 0
call message DoorName, LineNumber, MAGENTA ' ' Alias.q, 1
call message DoorName, LineNumber, CYAN right('Position:',32,' '), 0
call message DoorName, LineNumber, MAGENTA ' ' street.m 'North', 1
call message DoorName, LineNumber, CYAN right(' ',32,' '), 0
call message DoorName, LineNumber, MAGENTA ' ' street.n 'East', 1
call message DoorName, LineNumber, CYAN right('Total Gangmembers:',32,' '), 0
call message DoorName, LineNumber, MAGENTA ' ' totalgangmembers.q, 1
call message DoorName, LineNumber, CYAN right('Gangmembers with you:',32,' '), 0
call message DoorName, LineNumber, MAGENTA ' ' gangmembers.q, 1
call message DoorName, LineNumber, CYAN right('Money:',32, ' '), 0
call message DoorName, LineNumber, MAGENTA ' ' money.q, 1
call message DoorName, LineNumber, CYAN right('Bootleg Operations:',32,' '), 0
call message DoorName, LineNumber, MAGENTA ' ' bootleg.q, 1
call message DoorName, LineNumber, '' , 1
call message DoorName, LineNumber, GREEN 'Do you wish to see all blocks protected by you? (Y/n) ', 0
call hotkey DoorName, LineNumber, ""
ans = upper(result)
call checkcarrier
if upper(ans)='N' then signal main
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, CYAN 'Blocks protected:', 1
i = 12
do c = 1 to 25
do c1 = 1 to 25
protect_alias = Delword(protect.c.c1,1,1)
if protect_alias = alias.q then do
call message DoorName, LineNumber, MAGENTA street.c 'North' street.c1 'East with' word(protect.c.c1,1) 'gangmembers', 1
if i // LINES - 1 = 0 then do
call hotkey DoorName, LineNumber, 'Hit return to continue...'
call checkcarrier
call message DoorName, LineNumber, '', 1
end
i = i + 1
end
end
end
call hotkey DoorName, LineNumber, 'Hit return to continue...'
call checkcarrier
signal main
enter:
call message DoorName, LineNumber, CLS, 1
entera:
call prompt DoorName, LineNumber, YELLOW'To (? to list): ', 15
messto = upper(result)
call checkcarrier
a = 1
if messto = '?' then do
call message DoorName, LineNumber, '', 1
do i = 1 to z
call message DoorName, LineNumber, MAGENTA alias.i, 1
end
signal entera
end
if messto = '' then signal main
do u = 1 to z
if alias.u = messto then break
if u = z then do
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, RED'That ganglord is not in Chicago!', 1
address command "wait 1"
signal enter
end
end
call prompt DoorName, LineNumber, WHITE'Do you want to send this message anonymously?(y/N)', 1
ans = upper(result)
call checkcarrier
if ans = 'Y' then messfrom = 'Anonymous'
else messfrom = alias.q
call message DoorName, LineNumber, CLS, 1
call message DoorName, LineNumber, BLUE'Enter your message. Enter a return on a new line to leave editing.', 1
call message DoorName, LineNumber, '', 1
y = 1
conmess:
do i = y to 20
call message DoorName, LineNumber, WHITE'>', 0
do ii = 1 to 78
call hotkey DoorName, LineNumber, ""
messbody.i.ii = result
call checkcarrier
if messbody.i.ii ~= '' then do
call message DoorName, LineNumber, ''||messbody.i.ii, 1
end
if messbody.i.1 = '' then signal savemess
if messbody.i.ii = '' then break
if messbody.i.ii = '' then ii = ii - 2
end
call message DoorName, LineNumber, '', 1
end
savemess:
y = i
call message DoorName, LineNumber, '', 1
call message DoorName, LineNumber, GREEN'(Q) to quit, (S) to save, (R) to restart or (C) to continue', 1
call hotkey DoorName, LineNumber, ""
answer = upper(result)
call checkcarrier
if answer = 'Q' then signal main
if answer = 'C' then signal conmess
if answer = 'R' then signal enter
if answer = 'S' then signal savemess1
else signal savemess
savemess1:
call message DoorName, LineNumber, MAGENTA'Saving your message...', 0
if exists('Doors:chicago/gangland/messages') then call open(mess,'Doors:chicago/gangland/messages','A')
else call open(mess,'Doors:chicago/gangland/messages','W')
call writeln(mess,messto)
call writeln(mess,messfrom)
do h = 1 to y
store = ''
call message DoorName, LineNumber, '.', 0
do ii = 1 to 78
store = store''messbody.h.ii
if messbody.h.ii = '' then break
end
call writeln(mess,store)
end
call writeln(mess,'*****')
call close(mess)
signal main
death:
call message DoorName, LineNumber, CLS, 1
call message DoorName, LineNumber, center(RED'You have died 'SpaceName'.',76), 1
call message DoorName, LineNumber, ' ', 1
call message DoorName, LineNumber, CYAN'Clearing your stats..', 0
do c = 1 to 25
call message DoorName, LineNumber, '.', 0
do c1 = 1 to 25
protect_alias = Delword(protect.c.c1,1,1)
if protect_alias = alias.q then
protect.c.c1 = 0
end
end
alias.q = 'DEADMAN'
points.q = 0
totalgangmembers.q = 0
protection.q = 0
startx.q = 0
starty.q = 0
deathflag = 1
signal goodbye
goodbye:
call message DoorName, LineNumber, CLS, 1
call message DoorName, LineNumber, ''CYAN'Saving game stats..', 0
call open(data,File.9,'W')
do c = 1 to 25
call message DoorName, LineNumber, '.', 0
do c1 = 1 to 25
call writeln(data,protect.c.c1)
end
end
pointsg = totalgangmembers.q * 100
pointsp = protection.q * 1000
points.q = pointsg + pointsp
do i = 1 to z
if alias.i = '' then iterate
alias.i = space(alias.i,1,'_')
stats.i = name.i' 'alias.i' 'turnsleft.i' 'gangmembers.i' 'startx.i' 'starty.i' 'points.i' 'money.i' 'totalgangmembers.i' 'protection.i' 'bootleg.i
call writeln(data,stats.i)
end
call close(data)
address command "delete Doors:Chicago/Gangland/InUse QUIET"
call message DoorName, LineNumber, CLS, 1
call message DoorName, LineNumber, ' ', 1
call message DoorName, LineNumber, RED, 1
call message DoorName, LineNumber, center('Thank you for playing Chicago Gangland',70), 1
call message DoorName, LineNumber, ' ', 1
call message DoorName, LineNumber, ' ', 1
call message DoorName, LineNumber, MAGENTA, 1
call message DoorName, LineNumber, center('Now returning you to the 'bbsname' BBS', 70), 1
call message DoorName, LineNumber, CLEAR, 1
address command "wait 1"
call Exit_Door DoorName, LineNumber
exit
quickexit:
call message DoorName, LineNumber, CLS, 1
call message DoorName, LineNumber, ' ', 1
call message DoorName, LineNumber, RED, 1
call message DoorName, LineNumber, center('Thank you for playing Chicago Gangland',70), 1
call message DoorName, LineNumber, ' ', 1
call message DoorName, LineNumber, ' ', 1
call message DoorName, LineNumber, MAGENTA, 1
call message DoorName, LineNumber, center('Now returning you to 'bbsname' BBS',70), 1
call message DoorName, LineNumber, CLEAR, 1
address command "delete Doors:Chicago/Gangland/InUse QUIET"
address command "wait 1"
call Exit_Door DoorName, LineNumber
exit
syntax:
call message DoorName, LineNumber, "**syntax** in line: " SIGL " Severity: " RC, 1
say "**syntax** in line: " SIGL " Severity: " RC
call message DoorName, LineNumber, "Notify Sysop Immediately!!!!!!", 1
call message DoorName, LineNumber, " ", 1
address command "delete Doors:Chicago/Gangland/InUse"
call Exit_Door DoorName, LineNumber
exit
ioerr:
call message DoorName, LineNumber, "**IO ERROR** in line: " SIGL " Severity: " RC, 1
say"**IO ERROR** in line: " SIGL " Severity: " RC
call message DoorName, LineNumber, "Notify Sysop Immediately!!!!!!", 1
call message DoorName, LineNumber, " ", 1
address command "delete Doors:Chicago/Gangland/InUse"
call Exit_Door DoorName, LineNumber
exit
call Exit_Door DoorName, LineNumber
exit
CHECKCARRIER:
call cdetect doorname,linenumber
if upper(result)="NO CARRIER!" then signal endit
return